#########################################################
#Figure D2: Main Results Controlling for Alternative Explanations
#########################################################

dataaltexp <- read.dta13("./temp/figd2data_toplot.dta")
dataaltexp$type <- c("Euroscepticism", "Euroscepticism", "Risk of Unemployment", "Risk of Unemployment")
ggplot(dataaltexp, aes(as.factor(var), coef)) + 
  geom_pointrange(aes(ymin=coef-1.96*stderr, ymax=coef + 1.96*stderr), shape=16, size=1.7, color= "gray40") +
  geom_hline(yintercept = 0, color="red", lwd=1.2) + 
  theme_nice() + ylab("Effect on Leave Support") + xlab("Wealth Type") + 
  facet_wrap(~type) +
  theme(axis.title = element_text(size=14),
        axis.text = element_text(size=12),
        panel.grid.minor = element_blank(),
        panel.grid.major.y = element_blank(),
        panel.grid.major.x = element_line(linetype="solid")) + 
  scale_x_discrete(labels=c("Financial", "Property"))   + 
  scale_y_continuous(breaks=c(-.04, -0.02, 0, 0.02, 0.04) , limits=c(-.03,.04)) + coord_flip() 
ggsave("./figures/figd2.pdf")
rm(dataaltexp)